<?php 
class WomanAction extends GlobalAction{
	
	function _initialize(){			 
		 parent::_initialize();
		 //加载产品相关函数库
		 //LC('@.Help.goods');
		 LC('@.Help.myfuns');
		 $this->cate_id(1);
		
	}	 
	public function index(){
		$filter=$this->getfilter();
		
	   //女装下所有列表;	  
	   $cat_id=$this->cid;	
	   $list = $this->getAllGoods($cat_id);
	 
	   $list['cat_list']=$list['cat_index'];
       //重新排序
	   $brand_list=array_slice( $list['brand_list'],0,20);
       $temp=array();
	   foreach($brand_list as $key=>$val){
			if($val['sort_order']!=0){
			  $temp[]=$val;
			  unset($brand_list[$key]);
			}	   
	   }
	   $temp=multi_sort($temp,'sort_order');
	   $list['brand_list']=array_merge($temp,$brand_list);
       /*------------*/
	   $this->assign($list);
	   
       $this->display();
	}  
	//显示女装列表;
	public function mclist(){	
		$filter=$this->getfilter();
		
		//dump($this->getbyarams());
		if(!$this->getbyarams()){
		   U('Default/index','',true);
		}
        $cat_id=$this->getby('cat');
		$cat_id = empty($cat_id) ? $this->cid : intval($cat_id);
		$list = $this->getAllGoods($cat_id,$filter);	 
	  
	    
	  
	   if($cat_id==1){
		   if( (count($filter)==1)&& !empty($filter['cat']) ){
			  // U('Woman/index','',true);
		   }
		}
	    
	   ///$list=$this->getAllShow($this->getcatids(),$filter);	   
	 // $goods= $list['goods_list']	 ;
	  $images_loading='';
	  foreach($list['goods_list'] as $key=>$val){
	     $images_loading.="ii.loadImage('".__ROOT__.$val['picturet']."','','','',".$val['gid'].");";	  
	  }
	
	  
	   $this->assign('images_loading',$images_loading); 

	   $this->assign('nav_url',navurl('Woman'));
	   $f=unserialize(urldecode($_SESSION["goods_filter"]));
	   $cat_name= get_nav_cat_name();
	   $this->assign('cat_name','&nbsp;&nbsp;女装');
 //	dump($no_list); 
	   $this->assign($list);
	   $no_list=$this->getsearchno();	
	   $this->assign($no_list); 
	   
   	   $this->assign($filter);	
	   $this->get_orderby_psize('Woman');
       $this->display();	
	}
	
	
}
?>